//author:dhclly
const o =console.log;
let input = [1, 2];
let [first, second] = input;
o(first); // outputs 1
o(second); // outputs 2
// swap variables
[first, second] = [second, first];
o(first); // outputs 2
o(second); // outputs 1

let obj = {
    a: "foo",
    b: 12,
    c: "bar"
};
let { a, b } = obj;

//({ arg1, arg2 } = { arg1: "baz", arg2: 101 });  //make error